package me.pinion.check;


import com.jfinal.core.ActionInvocation;
import me.pinion.Log;
import me.pinion.check.annotation.CheckBind;
import me.pinion.check.annotation.CheckRunTime;

@CheckBind(CheckRunTime.class)
public class RunTimeCheck  extends AbstractCheck{
    @Override
    public int onRequest(Object anno, ActionInvocation ai) {
        Long start = System.currentTimeMillis();
        ai.invoke();
        Long stop = System.currentTimeMillis();
        Log.i("METHOD ->[" + ai.getMethodName() + "]<- cost::" + (stop - start));
        return 0;
    }
}
